package org.lh.controller;

import org.lh.annotation.AutoWired;
import org.lh.annotation.Controller;
import org.lh.annotation.RequestMapping;
import org.lh.service.UserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 作者：idea
 * 日期：2018/5/22
 * 描述：
 */
@Controller(value = "UserController")
public class UserController {

    @AutoWired
    public UserService userService;

    @RequestMapping(value = "/login1")
    public void login1(HttpServletRequest request, HttpServletResponse response){
        String username=request.getParameter("username");
        String password=request.getParameter("password");
        System.out.println(username+password);
        System.out.println("this is login4");
    }

    @RequestMapping(value = "/visiter")
    public String visiter(HttpServletRequest request, HttpServletResponse response) throws IOException {
        System.out.println("this is hhhh");
        return "../index.jsp";
    }

    @RequestMapping(value = "/login2")
    public void login2(HttpServletRequest request, HttpServletResponse response){
        System.out.println("this is login2");
    }

    @RequestMapping(value = "/login3")
    public void login3(HttpServletRequest request, HttpServletResponse response){
        System.out.println("this is login3");
    }
}
